package com.imaker.ajax.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.imaker.action.BaseAction;
import com.imaker.domain.RoleInfo;
import com.imaker.domain.UserInfo;
import com.imaker.domain.UserRoleInfo;
import com.imaker.service.RoleService;
import com.imaker.service.UserRoleService;
import com.opensymphony.xwork2.ActionContext;
/**
 * <p>程序名称：       UserRoleAction</p>
 * <p>程序说明：     用户角色action</p>
 * <p>版权信息：       Copyright mayonghua</p>
 * 
 * @author：          mayonghua
 * @version：         Ver 0.1
 */
@Controller
@Scope("prototype")
public class AjaxUserRoleAction extends BaseAction{

	@Autowired
	private UserRoleService userRoleService = null;
	@Autowired
	private RoleService roleService = null;
	private UserRoleInfo userRoleInfo;
	private List<UserRoleInfo> userRoleList;
	private List<RoleInfo> roleList;
	private UserInfo userInfo;
	private String flag;
	/**
	 * 初始化
	 * @return
	 */
	public String update() throws Exception{
		userRoleService.update(idList, flag,userInfo);
		return SUCCESS;
	}
	

	public UserRoleService getUserRoleService() {
		return userRoleService;
	}

	public void setUserRoleService(UserRoleService userRoleService) {
		this.userRoleService = userRoleService;
	}

	public RoleService getRoleService() {
		return roleService;
	}

	public void setRoleService(RoleService roleService) {
		this.roleService = roleService;
	}

	public UserRoleInfo getUserRoleInfo() {
		return userRoleInfo;
	}

	public void setUserRoleInfo(UserRoleInfo userRoleInfo) {
		this.userRoleInfo = userRoleInfo;
	}


	public List<UserRoleInfo> getUserRoleList() {
		return userRoleList;
	}


	public void setUserRoleList(List<UserRoleInfo> userRoleList) {
		this.userRoleList = userRoleList;
	}


	public List<RoleInfo> getRoleList() {
		return roleList;
	}


	public void setRoleList(List<RoleInfo> roleList) {
		this.roleList = roleList;
	}


	public UserInfo getUserInfo() {
		return userInfo;
	}


	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}


	public String getFlag() {
		return flag;
	}


	public void setFlag(String flag) {
		this.flag = flag;
	}

}
